<?php foreach ($this->search_result AS $key => $val) { ?>
<li<?php if ($val['focus']) { ?> focus="true"<?php } ?>>
<?php if ($val['type'] == 1) { ?>
    <?php if ($val['detail']['best_answer'] > 0) { ?><a class="i_img25x25" href="<?php echo $val['url']; ?>"></a><?php } ?>
    <p class="t_cal"> <a target="_blank" href="<?php echo $val['url']; ?>"><?php echo $val['name']; ?></p>
    <p><span class="topic_s">问题</span>&nbsp;&nbsp;<?php echo $val['detail']['answer_count']; ?> 个答案 &nbsp; • &nbsp; <?php echo $val['detail']['focus_count']; ?> 人关注 &nbsp; • &nbsp; <a href="#" onclick="focus_question($(this), $(this), <?php echo $val['sno']; ?>); return false;" title="关注">关注</a></p>
<?php } else if ($val['type'] == 2) { ?>
	<a class="i_img50x50" href="<?php echo $val['url']; ?>"><img src="<?php echo $val['detail']['topic_pic']; ?>" alt="<?php echo $val['name']; ?>" /></a>
    <p class="t_cal"> <a target="_blank" href="<?php echo $val['url']; ?>"><?php echo $val['name']; ?></a></p>
    <p><span class="topic_s">话题</span> &nbsp; <?php echo $val['detail']['topic_count']; ?> 个问题 &nbsp; • &nbsp; <?php echo $val['detail']['focus_count']; ?> 人关注 &nbsp; • &nbsp; <a href="#" onclick="focus_topic($(this), $(this), <?php echo $val['sno']; ?>); return false;" title="关注">关注</a></p>
<?php } else if ($val['type'] == 3) { ?>
	<a class="i_img50x50" href="<?php echo $val['url']; ?>"><img src="<?php echo $val['detail']['avatar_file']; ?>" alt="<?php echo $val['name']; ?>" /></a>
    <p class="t_cal"><a target="_blank" href="<?php echo $val['url']; ?>"><?php echo $val['name']; ?><span class="autograph"><?php echo $val['detail']['signature']; ?></span></a> </p>
    <p><span class="topic_s">用户</span> &nbsp; <?php echo $val['detail']['reputation']; ?> 分威望 &nbsp; • &nbsp; <?php echo $val['detail']['agree_count']; ?> 个赞同 &nbsp; • &nbsp; <?php echo $val['detail']['thanks_count']; ?> 个感谢 &nbsp; • &nbsp; <?php echo $val['detail']['focus_count']; ?> 人关注 &nbsp;<?php if ($val['sno'] != $this->user_id) { ?> • &nbsp; <a href="#" onclick="follow_people($(this), $(this), <?php echo $val['sno']; ?>); return false;" title="关注">关注</a><?php } ?></p>
<?php } ?>
</li>
<?php } ?>